//
//  CellOfMyForTwoSelect.m
//  PetAPP
//
//  Created by apple on 16/2/17.
//  Copyright © 2016年 Yuming. All rights reserved.
//

#import "CellOfMyForTwoSelect.h"
#import "MyOfTwoSelectView.h"

@implementation CellOfMyForTwoSelect

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {

    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.imageViewOfSelect = [[UIImageView alloc] init];
        [self.contentView addSubview:_imageViewOfSelect];
        [_imageViewOfSelect release];
        
        for (int i = 0 ; i < 2; i++) {
            MyOfTwoSelectView *view = [[MyOfTwoSelectView alloc] init];
            [self.imageViewOfSelect addSubview:view];
            [view release];
            view.tag = i + 10;
        }
        self.imageViewOfSelect.userInteractionEnabled = YES;
    }
    return self;

}

- (void)layoutSubviews {

    [super layoutSubviews];
    
    self.imageViewOfSelect.frame = CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height);
    for (int i = 0 ; i < 2; i++) {
        MyOfTwoSelectView * view = [self.imageViewOfSelect viewWithTag:(i + 10)];
        view.frame = CGRectMake(0, i * (self.contentView.frame.size.height / 2), self.contentView.frame.size.width, self.contentView.frame.size.height / 2);
    }
    
    

}



@end
